/*
 * KBestTreebank.h
 *
 *  Created on: Dec 18, 2014
 *      Author: Phong
 */

#ifndef KBESTTREEBANK_H_
#define KBESTTREEBANK_H_

#include <vector>
#include <fstream>
using namespace std;

#include "Deptree.h"
#include "Default.h"
#include "Treebank.h"

class KBestTreebank {
public:

	vector< vector<Deptree*> > trees;
	vector< vector<real> > scores;
    int refCount;

    KBestTreebank() {refCount = 1;}
    KBestTreebank* share();
    static void free(KBestTreebank* tb);

	static KBestTreebank* load(string path, Treebank* tb, Dictionary* vocaDic,
			Dictionary* posDic, Dictionary* deprelDic);

	static KBestTreebank* load(string path, Treebank* tb, Dictionary* vocaDic, Dictionary* posDic,
			Dictionary* deprelDic, int nTop);
    
private:
    ~KBestTreebank();
};

#endif /* KBESTTREEBANK_H_ */
